import request from '@/utils/request'


//用户管理
/**
 * 用户登录
 * @param data
 */
export function login(data) {
  data.type=0;
  return request({
    url: '/logistics/user/login',
    method: 'post',
    data
  })
}

/**
 * 用户登出
 */
export function logout() {
  return request({
    url: '/logistics/user/logout',
    method: 'post'
  })
}

/**
 * 获取用户信息
 */
export function getInfo() {
  return request({
    url: '/logistics/user/get/user/info',
    method: 'get'
  })
}


/**
 * 获取用户分页列表信息
 * @param pram
 */
export function getUserList(pram) {
  const data = {
    //keyword:pram.keyword,
    keyword:1,
    page: pram.page,
    limit: pram.limit,
  }
  return request({
    url: '/logistics/user/get/user/list',
    method: 'GET',
    params: data
  })
}

/**
 * @description 获取验证码
 */
export function captchaApi() {
  return request({
    url: `/logistics/validate/code/get`,
    method: 'get'
  })
}

/**
 * @description 检测验证码
 * @params {code:''key:''}
 */
 export function codeCheckApi(params) {
  return request({
    url: `/logistics/validate/code/check`,
    method: 'get',
    params
  })
}




